package com.foruo.learn.designmode.factory.factorymethod;

/**
 * 测试
 * @author GaoYuan
 * @date 2018/5/8 上午8:36
 */
public class TestMe {

    public static void main(String[] args){
        GoodsFactory goodsFactory;
        Goods goods;

        /** 连衣裙 */
        goodsFactory = new DressFactory();
        goods = goodsFactory.getGoods();
        System.out.println(goods.getPrice());

        /** 牛仔裤 */
        goodsFactory = new JeansFactory();
        goods = goodsFactory.getGoods();
        System.out.println(goods.getPrice());

        /** 鞋子 */
        goodsFactory = new ShoesFactory();
        goods = goodsFactory.getGoods();
        System.out.println(goods.getPrice());


    }
}
